/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef ADLLOCK_H
#define ADLLOCK_H

struct ocfs2_super;
struct adl_ctxt;

struct adl_lockstatus {
	struct page *page;
	u32 seqno;
};

int adl_lock(struct adl_ctxt *adl, u64 blkno, int offset,
				struct adl_lockstatus *lksb, int level, int flags);
int adl_unlock(struct adl_ctxt *adl, u64 blkno, int offset,
				struct adl_lockstatus *lksb, int level, int flags);
void adl_free_lock_lksb(struct adl_lockstatus *lksb);
int adl_alloc_lock_lksb(struct adl_ctxt *adl, u64 block,
		int offset, struct adl_lockstatus *lksb);
u32 adl_lock_seqno_get(struct adl_lockstatus *lksb);
void adl_lock_seqno_set(struct adl_lockstatus *lksb, u32 seqno);
extern void adl_do_release_other_nodes_truncate_log_request(struct ocfs2_super *osb);

#endif /* ADLLOCK_H */
